﻿using CSharpDay16__WebAPI_.Adapters.Adapters;
using CSharpDay16__WebAPI_.Adapters.Interfaces;
using CSharpDay16__WebAPI_.Data.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace CSharpDay16__WebAPI_.Controllers
{
    public class HomeController : Controller
    {
        private ISuperpeopleAdapter _adapter;

        public HomeController()
        {
            _adapter = new SuperpeopleAdapter();
        }

        public HomeController(ISuperpeopleAdapter a)
        {
            _adapter = a;
        }

        public ActionResult Index()
        {
            List<SuperPerson> model = _adapter.GetAllSuperPeople();
            return View(model);
        }

        public ActionResult AddSuperHero()
        {
            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }
    }
}